package com.ft.admix.bd.adapter;

import android.content.Context;

import com.baidu.mobads.sdk.api.BDAdConfig;
import com.ft.admix.base.ADMixAdapterIniter;
import com.ft.admix.config.PlatformConfig;

public class AdIniter extends ADMixAdapterIniter {

    @Override
    public void initialize(Context context, PlatformConfig config) {
        BDAdConfig bdAdConfig = new BDAdConfig.Builder()
                .setAppName("")
                .setAppsid(config.getAppId())
                .setBDAdInitListener(new BDAdConfig.BDAdInitListener() {
                    @Override
                    public void success() {
                        callInitSuccess();
                    }

                    @Override
                    public void fail() {
                        callInitFailed(10001, "bd_初始化失败");
                    }
                }).build(context);
        bdAdConfig.init();

    }

    @Override
    public String platformName() {
        return "bd";
    }
}